<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<% include  ./template/commonCss.ejs %>
	<link href="<%=resUrl%>/css/auction_ollection.css" rel="stylesheet" type="text/css" />
	<% include ./template/commonJs.ejs %>
	<% include ./template/chatLister.ejs %>
</head>

<body ontouchstart>
		<% var topTitle = '竞拍藏品';var topReturnType = '' %>
		<% include ./template/topReturn.ejs %>
	<div class="weui-tab">
		<div class="tabs" <%if(locals.token && token != ''){%>style="top:0;"<%}%>>
			<a class="item last current" href="javascript:" data-state="-1">
				全部
				<div class="v-line"></div>
			</a>
			<a class="item last" href="javascript:" data-state="0" >
				竞拍中
				<div class="v-line"></div>
			</a>
			<a class="item last" href="javascript:" data-state="1" >
				竞拍成功
				<div class="v-line"></div>
			</a>
			<a class="item last" href="javascript:" data-state="2" >
				淘汰竞拍
				<div class="v-line"></div>
			</a>
		</div>
	</div>
	<div id="aroundBox" <%if(locals.token && token != ''){%>style="top:1rem;"<%}%>>
		<div class="weui-pull-to-refresh__layer" style="padding: 5px;">
			<div class="weui-pull-to-refresh__arrow"></div>
			<div class="weui-pull-to-refresh__preloader"></div>
			<div class="down">下拉刷新</div>
			<div class="up">释放刷新</div>
			<div class="refresh">正在刷新</div>
		</div>
		<div id="contentTo" >
			<!-- content -->
		</div>
		<div class="weui-loadmore" id="loadmore">
			<i class="weui-loading"></i>
			<span class="weui-loadmore__tips">正在加载</span>
		</div>
		<div class="weui-loadmore weui-loadmore_line" style="display:none;" id="nomore">
			<span class="weui-loadmore__tips">全部加载完毕</span>
		</div>
		
	</div>	
			
	<script id="content" type="text/html">
		{{each list}}
		<div class="shoplist-item">
			<div class="shoplist-item-top">	
				<span>出价时间：{{$value.createDate | TimestampToTime}}</span>
				{{if $value.state == 0}}
				<div class="order-top-rig order-top-orange">竞拍中</div>
				{{else if $value.state == 1}}
				<div class="order-top-rig">竞拍完成</div>
				{{else if $value.state == 2}}
				<div class="order-top-rig">竞拍淘汰</div>
				{{/if}}
			</div>
			<div class="shoplist-item-body">
				<div class="order-body-let" style="width:1.68rem;height:1.68rem;background: url({{$value.productDetail.coverImage}}?x-oss-process=image/resize,w_500) no-repeat 0 center;background-size: 100% auto;">
				</div>	
				<div class="order-body-cen">
					<div class="order-pro-name">{{$value.productDetail.name}}</div>
					<div class="auto-height"></div>
					<div class="order-img"> 最高报价：¥<span>{{$value.productDetail.nowPrice}} </span></div>
					<div class="auto-height"></div>
					<div class="order-img">我的报价：¥<span>{{$value.bidPrice}} <span class="cdetail-top-orange">{{$value.first == true && $value.state == 0 ? '暂时领先':''}}</span></span></div>
				</div>	
				<div class="auto-height"></div>
				<div class="order-bottom" >
						{{if $value.state == 0}}
						<div class="order-bots order-bots-orange" data-row='{{$value}}' onclick="agentPic('{{$value}}');">代理出价</div>
						{{else if $value.state == 1}}
							<a href="javascript:visitUrl('/order/detail?id={{$value.orderDetail.id}}'),true">
							<div class="order-bots" >查看订单</div>
							</a>
						{{/if}}
				</div>
					
			</div>
		</div>
		{{/each}}
	</script>	
	<div id="agent_price" class='weui-popup__container'>
		<div class="weui-popup__overlay"></div>
		<div class="weui-popup__modal">
			<header class='demos-header'>
				<h1 class="demos-title">代理出价</h1>
			</header>
			<div class="weui-cells weui-cells_form">
				<div class="weui-cell">
					<div class="weui-cell__hd"><label class="weui-label">当前底价</label></div>
					<div class="weui-cell__bd nowPrice">
						￥0
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd"><label class="weui-label">加价/每手</label></div>
					<div class="weui-cell__bd bidIncrementPrice">
						￥0
					</div>
				</div>
				<div class="weui-cells__title">最高金额</div>
				<div class="weui-cell weui-cell_select">
					<div class="weui-cell__bd">
						<select class="weui-select" name="agentSendPrice" id="agentSendPrice">
						</select>
					</div>
				</div>
				<div class="weui-cell">
					<a href="javascript:;" class="weui-btn weui-btn_primary close-popup ok" data-productid="0" id="confirmAgentPrice" style="margin:0;width:3.6rem;">确认出价</a>
					<a href="javascript:;" class="weui-btn weui-btn_primary close-popup cancel" style="margin:0;width:3.6rem;margin-left:0.2rem;background-color:#CCCCCC;">取消出价</a>
				</div>
			</div>
		</div>
	</div> 
	<script type="text/javascript" src="<%=resUrl%>/js/auction_ollection.js"></script>
</body>

</html>